/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.

realizar un programa de dos arrays cuatro elementos 
obtener la suma de los dos vectores componente a componente
 */

package tests;

/**
 *
 * @author luis
 */
public class ClassEnteros {
    int [] enteros = new int[8];
    ClassEnteros(){
        System.out.println("Introduce los enteros: ");
        for (int i = 0; i < 8; i++) {
            enteros[i] = Scan.Console.nextInt();
        }
    }

    /**
     *
     * @param num
     * @return
     */
    public int Suma(int num){
        int sum = 0;
        for(int i: enteros){
            if(i>num) sum+=i;
        }
        return sum;
    }

    /**
     *
     * @param num
     * @return
     */
    public int Cantidad(int num){
        int can = 0;
        for(int i: enteros){
            if(i>num) can+=1;
        }
        return can;
    }

    /**
     *
     * @param args
     */
    public static void main(String[] args) {
        ClassEnteros entero = new ClassEnteros();
        System.out.println("Suma de todos: " + entero.Suma(Integer.MIN_VALUE));
        System.out.println("Suma de 36: " + entero.Suma(36));
        System.out.println("Cuenta de mayores de 50: " + entero.Cantidad(50));
    }
    
}
